/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ejb;

import java.util.List;
import javax.ejb.EJB;
import javax.jws.WebService;
import javax.ejb.Stateless;
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;

/**
 *
 * @author Ilo
 */
@WebService(serviceName = "NewWebService")
@Stateless()
public class NewWebService {
    @EJB
    private NewSessionBeanLocal ejbRef;// Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Web Service Operation")

    @WebMethod(operationName = "findEntity")
    public List<NewEntity> findEntity() {
        return ejbRef.findEntity();
    }

    @WebMethod(operationName = "addEntity")
    @Oneway
    public void addEntity(@WebParam(name = "parameter") String parameter) {
        ejbRef.addEntity(parameter);
    }
    
}
